package com.hhwy.frame.server.serviceImpl;

import com.hhwy.frame.domain.Person;
import com.hhwy.frame.server.IndexService;
import com.hhwy.framework.persistent.DAO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class IndexServiceImpl implements IndexService
{
    Logger log = LoggerFactory.getLogger(IndexServiceImpl.class);
    @Autowired
    public DAO<?> dao;


    @Override
    public List<Map> getList()
    {
        Person person = new Person();
        person.setAge(24);
        person.setName("张三丰");
        //dao.query("demo.sql.getUserList",new HashMap());
        List<Map> list = (List<Map>) dao.getBySql("demo.sql.getUserList",new Object());
        dao.delete(person);
        return list;
    }
}
